Skip to content

Add support for NetBSD, FreeBSD, and OpenBSD.#313

Merged
DeusData merged 1 commit intoDeusData:mainfrom
cmeerw:bsd-support
May 10, 2026
Merged

Add support for NetBSD, FreeBSD, and OpenBSD.#313
DeusData merged 1 commit intoDeusData:mainfrom
cmeerw:bsd-support

Conversation

@cmeerw
Copy link
Copy Markdown
Contributor

@cmeerw cmeerw commented May 2, 2026

Fixes #290

@DeusData DeusData added the enhancement New feature or request label May 4, 2026
@DeusData DeusData merged commit a338ff3 into DeusData:main May 10, 2026
@DeusData
Copy link
Copy Markdown
Owner

Merged via rebase, thanks @cmeerw. The #elif restructure is exactly the right shape — pulling BSDs out before the implicit Linux fallback fixes the root cause (the previous #elif !defined(_WIN32) /* Linux */ was branch-labeled "Linux" but actually included every non-Windows non-Apple system, which is why sysinfo() was being pulled in on NetBSD).

The OpenBSD-vs-FreeBSD/NetBSD split on HW_PHYSMEM vs HW_PHYSMEM64 is the right call — OpenBSD never grew the 64-bit variant, and on modern 64-bit OpenBSD HW_PHYSMEM returns the full value into our uint64_t anyway. Issue #290 auto-closed with the merge.

Treating all BSD cores as perf_cores matches the Linux path (BSDs don't expose a perf/efficiency distinction) — also correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Does not build on NetBSD (or any other BSD)

2 participants